package com.sufen.common.reponse;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @description: 对Hash进行了简单的封装，可用来接收Mybatis查询出来的数据
 * @function:
 * @author: Liu Menglei
 * @Date: 2021/11/2 0002 15:13
 */
public class CommonEntity extends HashMap<String, Object> implements Serializable {

    public void setAttribute(String key, Object value) {
        if (value==null){
            this.put(key,"");return;
        }
        this.put(key, value);
    }

    public Object getAttribute(String key) {
        return this.get(key);
    }

    public Map<String, Object> getRow() {
        return this;
    }

}